capture log close
set more off
clear all

* Set file path to replication folder here
global user="/Users/elies/Dropbox/Climate fairness/06 Empirics/05 DCP data/07 Replication NComms"

cd "$user"
global data="$user/02 Data"
global output="$user/03 Results"
cd "$user/01 Code/"

use "$data/pooled_touse.dta"

*svyset weight: mbweight

* Sociodemographics in population, raw sample, weighted sample
* France (country==4)
*** Check weights 
/* Age: 18-29: 20%
Age: 30-44: 23%
Age: 45-64: 32%
Age: 65+: 26%
Education: 16yrs or less 26%
Education: 17-18 25%
Education: 19+ 49%
Gender: Male 47%
Gender: Female 53%
*/
di "FRANCE"
tab agegroups if country==4
tab agegroups [aweight=mbweight] if country==4

tab educ_yrs if country==4
tab educ_yrs [aweight=mbweight] if country==4

tab female if country==4
tab female [aweight=mbweight] if country==4

* Germany
/* Age: 18-29: 19%
Age: 30-44: 21%
Age: 45-64: 35%
Age: 65+: 24%
Education: 16yrs or less 38%
Education: 17-18 19%
Education: 19+ 43%
Gender: Male 49%
Gender: Female 51%
*/
di "Germany"
tab agegroups if country==3
tab agegroups [aweight=mbweight] if country==3

tab educ_yrs if country==3
tab educ_yrs [aweight=mbweight] if country==3

tab female if country==3
tab female [aweight=mbweight] if country==3

* United Kingdom
/* Age: 18-29: 22%
Age: 30-44: 26%
Age: 45-64: 30%
Age: 65+: 22%
Education: 16yrs or less 41%
Education: 17-18 28%
Education: 19+ 31%
Gender: Male 50%
Gender: Female 50%
*/

di "UK"
tab agegroups if country==2
tab agegroups [aweight=mbweight] if country==2

tab educ_yrs if country==2
tab educ_yrs [aweight=mbweight] if country==2

tab female if country==2
tab female [aweight=mbweight] if country==2


* United States
/* Age: 18-29: 30%
Age: 30-44: 25%
Age: 45-64: 25%
Age: 65+: 20%
Education: Less than HS: 12%
Education: HS 28%
Education: Some College: 31%
Education: BA or higher: 29%
Gender: Male 48%
Gender: Female 52%
*/
di "US"
tab agegroups if country==1
tab agegroups [aweight=mbweight] if country==1

tab educ if country==1
tab educ [aweight=mbweight] if country==1

tab female if country==1
tab female [aweight=mbweight] if country==1

clear
exit
